//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.dflc.utils;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
public class PageEntity<T> {
    @JsonProperty("currentPage")
    private Long currentPage;
    @JsonProperty("pageSize")
    private Long pageSize;
    @JsonProperty("totalCount")
    private Long totalCount;
    @JsonProperty("totalPage")
    private Long totalPage;
    private List<T> data;

    public PageEntity() {
    }

    public Long getCurrentPage() {
        return this.currentPage;
    }

    public Long getPageSize() {
        return this.pageSize;
    }

    public Long getTotalCount() {
        return this.totalCount;
    }

    public Long getTotalPage() {
        return this.totalPage;
    }

    public List<T> getData() {
        return this.data;
    }

    @JsonProperty("currentPage")
    public void setCurrentPage(final Long currentPage) {
        this.currentPage = currentPage;
    }

    @JsonProperty("pageSize")
    public void setPageSize(final Long pageSize) {
        this.pageSize = pageSize;
    }

    @JsonProperty("totalCount")
    public void setTotalCount(final Long totalCount) {
        this.totalCount = totalCount;
    }

    @JsonProperty("totalPage")
    public void setTotalPage(final Long totalPage) {
        this.totalPage = totalPage;
    }

    public void setData(final List<T> data) {
        this.data = data;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof PageEntity)) {
            return false;
        } else {
            PageEntity<?> other = (PageEntity)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label71: {
                    Object this$currentPage = this.getCurrentPage();
                    Object other$currentPage = other.getCurrentPage();
                    if (this$currentPage == null) {
                        if (other$currentPage == null) {
                            break label71;
                        }
                    } else if (this$currentPage.equals(other$currentPage)) {
                        break label71;
                    }

                    return false;
                }

                Object this$pageSize = this.getPageSize();
                Object other$pageSize = other.getPageSize();
                if (this$pageSize == null) {
                    if (other$pageSize != null) {
                        return false;
                    }
                } else if (!this$pageSize.equals(other$pageSize)) {
                    return false;
                }

                label57: {
                    Object this$totalCount = this.getTotalCount();
                    Object other$totalCount = other.getTotalCount();
                    if (this$totalCount == null) {
                        if (other$totalCount == null) {
                            break label57;
                        }
                    } else if (this$totalCount.equals(other$totalCount)) {
                        break label57;
                    }

                    return false;
                }

                Object this$totalPage = this.getTotalPage();
                Object other$totalPage = other.getTotalPage();
                if (this$totalPage == null) {
                    if (other$totalPage != null) {
                        return false;
                    }
                } else if (!this$totalPage.equals(other$totalPage)) {
                    return false;
                }

                Object this$data = this.getData();
                Object other$data = other.getData();
                if (this$data == null) {
                    if (other$data == null) {
                        return true;
                    }
                } else if (this$data.equals(other$data)) {
                    return true;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PageEntity;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $currentPage = this.getCurrentPage();
        result = result * 59 + ($currentPage == null ? 43 : $currentPage.hashCode());
        Object $pageSize = this.getPageSize();
        result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());
        Object $totalCount = this.getTotalCount();
        result = result * 59 + ($totalCount == null ? 43 : $totalCount.hashCode());
        Object $totalPage = this.getTotalPage();
        result = result * 59 + ($totalPage == null ? 43 : $totalPage.hashCode());
        Object $data = this.getData();
        result = result * 59 + ($data == null ? 43 : $data.hashCode());
        return result;
    }

    public String toString() {
        return "PageEntity(currentPage=" + this.getCurrentPage() + ", pageSize=" + this.getPageSize() + ", totalCount=" + this.getTotalCount() + ", totalPage=" + this.getTotalPage() + ", data=" + this.getData() + ")";
    }
}
